<!--
 * @Description:
 * @version:
 * @Author: 尹鹏孝
 * @Date: 2022-12-19 16:01:10
 * @LastEditors: 尹鹏孝
 * @LastEditTime: 2022-12-20 10:18:05
-->
<template lang="">
    <a-button @click="clickBtn">这个一个btn组件</a-button>
</template>
<script lang="ts" setup>
import { reactive, computed } from 'vue'
import { provide, inject } from 'vue'
import type { InjectionKey } from 'vue'
interface Book{
    title: string;
    year?: number;
    author: string;
}

const book: Book = reactive({ title: '111', author: '111' })

const double = computed<number>(() => {
    return 11
})
const clickBtn = (event: Event) => {
    console.log((event.target as HTMLInputElement).value)
}

const key = Symbol() as InjectionKey<string>
provide(key, 'foo')
const foo = inject<string>('foo', 'bar')
</script>
<style lang="">

</style>